home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / Level 0 Macintosh 29Sep94 / Audit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  1.3 KB  |  45 lines  |  [TEXT/KAHL]

  1. /* Audit.h */
  2.  
  3. #ifndef Included_Audit_h
  4. #define Included_Audit_h
  5.  
  6. /* Audit module depends on: */
  7. /* MiscInfo.h */
  8. /* Definitions */
  9. /* Debug */
  10.  
  11. /* to use this audit-trail generator, include this macro in the prefix */
  12. /* #define AUDIT (1)  enables auditing */
  13. /* #define AUDIT (0)  eliminates auditing */
  14. /* in addition, if your program is very crash-prone, you can cause the audit */
  15. /* file to be flushed to disk after every APRINT. */
  16. /* #define AUDITFLUSHING (1)  enables audit flushing */
  17. /* #define AUDITFLUSHING (0)  disables audit flushing */
  18.  
  19. /* APRINT prints a string in the same way that printf does.  it accepts these options: */
  20. /* %s = decimal signed short */
  21. /* $xs = hexadecimal short */
  22. /* %l = decimal signed long */
  23. /* %xl = hexadecimal long */
  24. /* %b = boolean from short */
  25. /* %c = decimal signed char */
  26. /* %xc = hexadecimal char */
  27. /* %t = C String (text) */
  28. /* %p = Pascal string */
  29. /* %r = Reference (a pointer) */
  30.  
  31. /* since it's a macro, remember to use DOUBLE parens with APRINT! */
  32.  
  33. #if AUDIT
  34.     void    ENDAUDIT(void);
  35.     void    AuditPrint(char* Str,...); /* Internal routine only */
  36.     void    AHEXDUMP(char* Ptr, long NumBytes);
  37.     #define APRINT(param) AuditPrint param
  38. #else
  39.     #define ENDAUDIT() ((void)0)
  40.     #define AHEXDUMP(param1,param2) ((void)0)
  41.     #define APRINT(param) ((void)0)
  42. #endif
  43.  
  44. #endif
  45.